﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DesignPattern.AdapterPattern02
{
    public class MediaAdapter : IMediaPlayer//实现旧接口  
    {
        //组合新接口  
        private IAdvancedMediaPlayer _advancedMediaPlayer;

       
        public MediaAdapter(IAdvancedMediaPlayer advancedMediaPlayer)
        {
            _advancedMediaPlayer = advancedMediaPlayer;
        }
        public void Play()
        {
            _advancedMediaPlayer.PlayMp4();
        }
    }
}
